<?php
/**
 * The template for displaying Author Archive pages
 *
 * Methods for TimberHelper can be found in the /lib sub-directory
 *
 * @package  WordPress
 * @subpackage  Timber
 * @since    Timber 0.1
 */
namespace ITSociaal\Themes\Lumber;

use TimberUser;

call_user_func(function() {
	global $wp_query;

	$context = Timber::get_context();
	$context["posts"] = Timber::get_posts();

	if (isset($wp_query->query_vars["author"])) {
		$author = new TimberUser($wp_query->query_vars["author"]);
		$context["author"] = $author;
		$context["title"] = "Author Archives: " . $author->name();
	}

	Timber::render(["author.twig", "archive.twig"], $context);
});

/* vi:set ts=4 sw=4 noet: */
